package projectEuler;

public class Problem_10 {
        public static void main(String[] args) {
                int slider = 6;
                int array[] = new int[2000000];
                array[0] = 2; array[1] = 3;
                array[2] = 5; array[3] = 7;
                array[4] = 11; array[5] = 13;
                int number = 15;
                int sum = 41;
                do{
                        for(int otherNumber = 2; otherNumber<(int)Math.pow(number, .5)+1; otherNumber++){
                                if(number%otherNumber == 0){
                                        otherNumber = 2;
                                        number = number + 2;
                                }
                        }
                        if(number < 2000000){
                                sum = sum + number;
                                number = number + 2;
                        }
                }while(number < 2000000);
                System.out.println(sum);
        }
}